﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace EnvironmentalMonitor.WebApplication.Manage.PostPage
{
    /// <summary>
    /// 管理页面类
    /// </summary>
    public partial class Manage : EnvironmentalMonitor.WebApplication.Abstract.AbstractList
    {
        private string _Description;
        public override string Description
        {
            get
            {
                return this._Description;
            }
        }

        private string _ListJsonUrl;
        public override string ListJsonUrl
        {
            get
            {
                return this._ListJsonUrl;
            }
        }

        public override string SaveJsonUrl
        {
            get
            {
                return string.Format("{0}Manage/PostPage/SaveJson.aspx", EnvironmentalMonitor.Support.Resource.Variable.VirtualRootPath);
            }
        }

        public override string DeleteJsonUrl
        {
            get
            {
                return string.Format("{0}Manage/PostPage/DeleteJson.aspx", EnvironmentalMonitor.Support.Resource.Variable.VirtualRootPath);
            }
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            const string POST_ID = "post_id";
            const string POST_NAME = "post_name";

            string postGuid = this.ParameterString(POST_ID);
            string postName = this.ParameterString(POST_NAME);

            this._Description = postName;
            this._ListJsonUrl = string.Format("{0}Manage/PostPage/ManageJson.aspx?POST_ID={1}", EnvironmentalMonitor.Support.Resource.Variable.VirtualRootPath, postGuid);
        }
    }
}